package com.gomoney.oauth2.common.entity.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.*;

/**
 * Created by admin on 2018/7/20.
 *
  create table sys_user(
    user_id varchar(50) primary key ,
    user_name varchar(32),
    user_pass varchar(100),
    user_email varchar(32),
    mobile varchar(32),
    state varchar(2),
    optrdate datetime
  );
 * alter table t_employee add realname varchar(50);
 * alter table t_employee add address varchar(500);
 */
@Data
@TableName("sys_user")
public class SysUser implements Serializable {
    private static final long serialVersionUID = 7721677459009101644L;

    @TableId(type = IdType.ASSIGN_ID)
    private String userId;

    private String userName;

    private String userPass;

    private String realname;

    private String userEmail;

    private String mobile;

    private int state;

    private Timestamp optrdate;

    @TableField(exist = false)
    private String token;

    @TableField(exist = false)
    private List<String> roleIdList=new ArrayList<String>();

    @TableField(exist = false)
    Set<String> permsSet = new HashSet<String>();
}
